<template>
  <div>
    <el-card>
      <el-button
        :class="{ btnColor: action }"
        @click="action = true"
      >取件任务</el-button>
      <el-button
        :class="{ btnColor: !action }"
        @click="action = false"
      >派件任务</el-button>
    </el-card>
    <div>
      <dispatch v-if="action" />
      <pick v-else />
    </div>
  </div>
</template>

<script>
import dispatch from '@/views/transport/dispatch'
import pick from '@/views/transport/pick'
export default {
  components: {
    dispatch,
    pick
  },
  data() {
    return {
      action: true
    }
  }
}
</script>

<style lang="scss" scoped>
.btnColor {
  background: #ffeeeb;
  color: #e15536;
  }
</style>
